package com.blb.ssm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.blb.ssm.entity.Goods;
import com.blb.ssm.entity.Order;
import com.blb.ssm.entity.Order_goods;

public interface TestDao {
	
	@Select("select scom from supplier")
	List<String> getsupplier();
	
	@Insert("insert into orders values(#{oid},#{osname},#{oname},#{onum},#{ostate},#{odate},#{omsg},#{odepot},#{obill},#{otype})")
	void addOrder(Order order);
	
	@Select("select * from goods")
	List<Goods> getgoods();
	
	@Insert("insert into order_goods values(#{oid},#{gid},#{num},#{price},#{money},#{msg})")
	void addOrder_goods(Order_goods og);

	@Update("update orders set ostate=#{ostate} where oid=#{oid}")
	void saveShrk(@Param("oid")String oid, @Param("ostate")String ostate);

}
